Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed front page + results page design #34

Merged
merged 1 commit into from
Nov 14, 2017
Merged

Changed front page + results page design #34

merged 1 commit into from
Nov 14, 2017

Conversation

janelljchen
Copy link
Contributor

@janelljchen janelljchen commented Nov 13, 2017

i got rid of the basic.html file and instead added a new one called results.html. You can delete the basic.html.

Copy link
Contributor

@freddiev4 freddiev4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some feedback below. Can you also post a screenshot/gif of the layout here in a GitHub comment?

@@ -67,14 +67,14 @@ def index(request):

def info(request):
print("RESTAURANTS", request.POST)
city = request.POST['location']
city = request.POST['location'].title()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we call .title() here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ahh that's just to make the first letter capital (like boston --> Boston)

term = request.POST['term']
data = [city, term]
#yelp_call() returns dictionary of restaurant and its information
restaurants = yelp_call(term, city)

save_user_request(data)
return render(request, 'basic.html', {'restaurants': restaurants})
return render(request, 'results.html', {'restaurants': restaurants, 'city': data[0], 'term':data[1]})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@janelljchen
Copy link
Contributor Author

image

@janelljchen
Copy link
Contributor Author

image

@freddiev4 freddiev4 mentioned this pull request Nov 13, 2017
@freddiev4 freddiev4 merged commit 5f9711e into master Nov 14, 2017
@freddiev4 freddiev4 deleted the front-page branch November 14, 2017 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants